Subject: Image processing
From: [email-masked]
To: [email-masked]
Date: Sat, 16 Dec 95 15:20:5 GMT

Hello guy,

 > However I don't know how to separate and pull a 0 to 16 value from
 > the "F" and the "G" and the "3" of the "FG3" string. This is not the
 > sort of programming at which I am good. I just need the line of code
 > to get these 3 values, average them, set a minimum threshold to kill
 > the pixel to zero, and then I'll run the procedure about 1,200,000
 > times to process each pixel in my 70 frame animation.

Well, to be honest: DO YOU KNOW ANYTHING ABOUT HEX NUMBER???

You ask about a possible "FG3" string that should be the colour of a point.
But the hex numbers go FROM 0 (zero) up TO F and F means 15. So, you have:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, 12 and so on.
But 11 will NOT mean eleven, but it stands for the normal 17. Is it clear??

Now, the Point(,) function does not return a string, but a number. You can
display it such as a string, using the hex$() function, but it still remain

a
number.

It's better to display it in hex, since in this way you can "think" that
each
part of the number is a component of the colour. $4F6 means that the RED
level is 4, the GREEN one is F (=15) and the BLU one is 6: this is why it's
called RGB.

Now, to know the value of each component, you can do:
R=Point(x,y)/256
G=(Point(x,y)/16)-(R*16)
B=Point(x,y)-(R*256)-(G*16)

Is it clear??

But if you own Craft extension look for a special command about all it.

Bye.

      _____________________________________________________________
      |   \ | /   Michele Berionne             Not tonight dear,  |
      |    \|/                                 I have a modem!!   |
      |   --*--   [email-masked]                         |
      |    /|\                                 Don't panic!!      |
      |   / | \                                                   |
      | BASIC programmers never die, they GOSUB and don't RETURN. |
      |-----------------------------------------------------------|
      *            On AMINET:                                     *
      * game/shoot/fantasy.lha         game/think/atoms.lha       *
      * game/shoot/in_the_target.lha   game/think/navalbattle.lha *
      *                                                           *
      */\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/*